attribute vec4 a_position;
attribute vec3 a_normal;
uniform mat4 u_projectionViewMatrix;
uniform mat3 u_normalsToView;
uniform mat4 u_viewMatrix;
uniform float invFar;
varying float v_depth;
varying vec3 v_normal;

void main()
{
	v_depth =  -invFar * (u_viewMatrix * a_position).z;
	gl_Position = u_projectionViewMatrix * a_position;	
	v_normal =  u_normalsToView * a_normal;
}